import React, {PureComponent} from "react";
import {Route, Switch, Redirect} from 'react-router-dom'
import AboutComponent from '../../about/AboutComponent'
import ContentListComponent from './ContentListComponent'
import ContentImgListComponent from './ContentImgListComponent'
import HomeComponent from "../../home/HomeComponent";
import OpenAPIComponent from "../../openAPI/OpenAPIComponent";
import LogComponent from "../../log/LogComponent";
import QrCodeComponent from "../../qrcode/QrCodeComponent";

class ContentMainComponent extends PureComponent {
    render() {
        return (
            <div>
                <Switch>
                    <Route exact path='/index' component={HomeComponent}/>
                    <Route exact path='/reg_qrcode' component={QrCodeComponent}/>
                    <Route exact path='/deviceList' component={ContentListComponent}/>
                    <Route exact path='/imgList' component={ContentImgListComponent}/>
                    <Route exact path='/runLog' component={LogComponent}/>
                    <Route exact path='/about' component={AboutComponent}/>
                    <Route exact path='/openAPI' component={OpenAPIComponent}/>
                    <Redirect to="/index"/>
                </Switch>
            </div>
        )
    }
}

export default ContentMainComponent
